import {postlink} from "@/api/postapi.js"

export let sorta ={
    state:{
        onearr:[],
    },
    mutations:{
        axiossa(state,payload){
            state.onearr=payload.data.msg,
            console.log(state.onearr);
        }
    },
    actions:{
        axiosjta(context,payload){
            postlink(payload.url,payload.data).then((ok) =>{
                console.log(ok);
                console.log(ok.data);
                context.commit("axiossa",ok);
            }).catch((err) =>{
                console.log(err);
            })
        }
    }
}